package com.rural.bus;

import cn.jpush.android.api.JPushInterface;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;
/***
 * 欢迎页
 * @author majie
 *
 */
public class WelcomeActivity extends Activity {
	
	private Handler mHandler=new Handler(){
		public void handleMessage(android.os.Message msg) {
			super.handleMessage(msg);
			startActivity(new Intent(WelcomeActivity.this, MainActivity.class));
			finish();
		};
	};
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
//		  getWindow().setFlags(WindowManager.LayoutParams.FILL_PARENT, WindowManager.LayoutParams.FILL_PARENT);  //设置全屏  
		setContentView(R.layout.activity_welcome);
		
		mHandler.sendEmptyMessageDelayed(0, 3000);
	}
	
	@Override
	protected void onResume() {
		super.onResume();
		JPushInterface.onResume(this);

	}
	
	@Override
	protected void onPause() {
		super.onPause();
		JPushInterface.onPause(this);
		
	}

}
